package com.jeect.userservice3.domain;

import org.springframework.security.core.GrantedAuthority;
import org.springframework.security.core.userdetails.User;

import java.util.Collection;

public class AuthUser extends User {

    private String codes;
    public AuthUser(String username, String password,String codes, Collection<? extends GrantedAuthority> authorities) {
        super(username, password, authorities);
        this.codes=codes;
    }

    public AuthUser(String username, String password,String codes, boolean enabled, boolean accountNonExpired, boolean credentialsNonExpired, boolean accountNonLocked, Collection<? extends GrantedAuthority> authorities) {
        super(username, password, enabled, accountNonExpired, credentialsNonExpired, accountNonLocked, authorities);
        this.codes=codes;
    }

    public String getCodes() {
        return codes;
    }

    public void setCodes(String codes) {
        this.codes = codes;
    }
}
